package com.mes.schedule.algorithm.iface;

import java.util.Date;
import java.util.List;

import org.dom4j.Document;

import com.mes.common.util.Page;
import com.mes.schedule.domain.SDevice;
import com.mes.schedule.domain.SOperationTask;
import com.mes.schedule.domain.SPartTask;
import com.mes.schedule.domain.ScheduleEvent;
import com.mes.schedule.domain.ScheduleScheme;

/*import org.jdom.Document;

import com.mes.common.bo.IBasicManager;
import com.mes.common.util.Page;
import com.mes.schedule.persistence.domain.SDevice;
import com.mes.schedule.persistence.domain.SOperationTask;
import com.mes.schedule.persistence.domain.SPartTask;
import com.mes.schedule.persistence.domain.ScheduleEvent;
import com.mes.schedule.persistence.domain.ScheduleScheme;*/

public interface IScheduleStateFind  {

	// public void analysis(ScheduleScheme scheme);

	public List<SPartTask> partTaskSortByDelay(ScheduleScheme scheme);

	public SPartTask findMostTardiness(ScheduleScheme scheme);

	public SPartTask findMostWaitTime(ScheduleScheme scheme);

	public List<SPartTask> getPartTasksSortByWaitTime(ScheduleScheme scheme);

	public List<SPartTask> getPartTasksSortByTardiness(ScheduleScheme scheme);

	public List<SOperationTask> getOperationTasksSortByTardiness(
			ScheduleScheme scheme);

	public SOperationTask findMostWaitTimeSOperationTask(ScheduleScheme scheme);

	public SPartTask findMostTardinessWithWaitTime(ScheduleScheme scheme);

	public SDevice findMostIdleDevice(ScheduleScheme scheme);

	public List<SDevice> getDeviceSortByCriticalLevel(ScheduleScheme scheme);

	/**
	 * 获取调度事件 进行展示
	 * 
	 * @param scheme
	 * @param thisUpdateTime
	 * @param type
	 * @return
	 * @throws Exception
	 */
	public List<ScheduleEvent> findScheduleEvents(ScheduleScheme scheme,
			Date thisUpdateTime, String type) throws Exception;

	/**
	 * 获取所有调度事件进行展示
	 * 
	 * @param scheme
	 * @param fromDate
	 * @param toDate
	 * @param eventState
	 * @param eventType
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public List<ScheduleEvent> findALlScheduleEvents(ScheduleScheme scheme,
			Date fromDate, Date toDate, Integer eventState, String eventType,
			Page page) throws Exception;

	public String eventProCompletePrepare(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProExceptionPrepare(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProFeedbackCoTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProLateFinishChange(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProLockTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProOperationPlanInfo(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProOperationTaskAdd(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	String eventProOperationTaskCancelGroup(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	String eventProOperationTaskDELETE(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProOperationTaskGroup(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskAdd(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskCancelCombineBatch(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskCombineBatch(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskDELETE(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskPlanInfoChange(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPartTaskSplitBatch(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProPublichCoTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProReceiveCoTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProRefuseCoTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProScheduleCurrentTimeChange(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProStartPrepare(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	public String eventProUnPublichCoTask(ScheduleScheme scheme,
			ScheduleEvent scheduleEvent, Document contentXml) throws Exception;

	}
